﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;

namespace SwaggerApis.Controllers
{
    /// <summary>
    /// 我的Demo
    /// </summary>
    [Route("Demo")]
    public class DemoController : ControllerBase
    {
        [HttpGet("GetStr")]
        public string[] GetStr()
        {
            return new string[] { "11", "222" };
        }

        /// <summary>
        /// 临时案例02
        /// </summary>
        /// <returns></returns>
        /// <example>xxxx</example>
        [HttpGet("GetStr2")]
        public MyUserModel GetStr2()
        {
            return new MyUserModel
            {
                Name = "csy",
                Age = 111
            };
        }
    }

    public class MyUserModel
    {
        /// <summary>
        /// 用户名
        /// </summary>
        public string Name { get; set; }

        public int Age { get; set; }
    }
}